#include <stdio.h>
#include <string.h>

int main()
{
    char str[] = "apple, orange, banana";
    char *token;
    char *context = NULL;

    //使用 strtok_s 分割字符串
    token = strtok_s(str, ",", &context);
    while ( token != NULL )
    {
        printf("Token: %s\n ", token);
        token = strtok_s(NULL, ",", &context);
    }
    return 0;
}